package NovelBar.controller;

import NovelBar.dto.PayChapterDto;
import NovelBar.entity.PayChapter;
import NovelBar.service.PayChapterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayChapterController {
    @Autowired
    PayChapterService payChapterService;

    @RequestMapping("/public/insertPayChapter")
    public String insertPayChapter(PayChapterDto payChapterDto){
        return payChapterService.insertPayChapter(payChapterDto);
    }

    @RequestMapping("/public/selectPayChapter")
    public PayChapter selectPayChapter(Integer chapterId, Integer userId){
        return payChapterService.selectPayChapter(chapterId,userId);
    }
}
